<?php

class Controller_Boletophp_Welcome extends Controller_Template {

	public $template = 'template/boletophp';
	
	public function before() {
		
		parent::before();
		
		$this->menu();
	}

	public function menu(){
		
		$methods = get_class_methods( new Controller_Boletophp_PrintBoleto($this->request, $this->response) );
		
		echo '<h1>Boletophp</h1>';
		echo '<ul>';
		
		foreach($methods as $method){
			
			$prefixx = substr($method, 0, 7);
			
			if($prefixx == 'action_'){
				
				echo '<li>';
				
					$name = substr($method, 7);					
					echo html::anchor('boletophp/printBoleto/'.$name, $name);
				
				echo '</li>';
			}
		
		}
		
		echo '</ul>';
		
	}
	
	public function action_index()
	{
		//echo "hello";
  		$this->template->content = View::factory('welcome/index');
	}
	
}

?>